<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="hy156255">pg_trigger</title>
  <body>
    <p>The <codeph>pg_trigger</codeph> system catalog table stores triggers on tables.</p>
    <note type="note">Greenplum Database does not support triggers. </note>
    <table id="hy183441">
      <title>pg_catalog.pg_trigger</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="86pt"/>
        <colspec colnum="3" colname="col3" colwidth="85pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1"><codeph>tgrelid</codeph></entry>
            <entry colname="col2">oid </entry>
            <entry colname="col3"><i>pg_class.oid</i><p>Note that Greenplum Database
                does not enforce referential integrity.</p></entry>
            <entry colname="col4">The table this trigger is on.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgname</codeph></entry>
            <entry colname="col2">name</entry>
            <entry colname="col3"/>
            <entry colname="col4">Trigger name (must be unique among triggers of same
              table).</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgfoid</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"><i>pg_proc.oid</i><p>Note that Greenplum Database
                does not enforce referential integrity.</p></entry>
            <entry colname="col4">The function to be called.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgtype</codeph></entry>
            <entry colname="col2">int2</entry>
            <entry colname="col3"/>
            <entry colname="col4">Bit mask identifying trigger conditions.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgenabled</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">True if trigger is enabled.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgisinternal</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">True if trigger is internally generated (usually, to enforce the constraint identified by tgconstraint).</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgconstrrelid</codeph></entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"><i>pg_class.oid</i><p>Note that Greenplum Database
                does not enforce referential integrity.</p></entry>
            <entry colname="col4">The table referenced by an referential integrity
              constraint.</entry>
          </row>
          <row>
            <entry><codeph>tgconstrindid</codeph></entry>
            <entry>oid</entry>
            <entry><i>pg_class.oid</i></entry>
            <entry>The index supporting a unique, primary key, or referential integrity
              constraint.</entry>
          </row>
          <row>
            <entry><codeph>tgconstraint</codeph></entry>
            <entry>oid</entry>
            <entry><i>pg_constraint.oid</i></entry>
            <entry>The <codeph>pg_constraint</codeph> entry associated with the trigger, if
              any.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgdeferrable</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">True if deferrable.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tginitdeferred</codeph></entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">True if initially deferred.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgnargs</codeph></entry>
            <entry colname="col2">int2</entry>
            <entry colname="col3"/>
            <entry colname="col4">Number of argument strings passed to trigger function.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgattr</codeph></entry>
            <entry colname="col2">int2vector</entry>
            <entry colname="col3"/>
            <entry colname="col4">Currently not used.</entry>
          </row>
          <row>
            <entry colname="col1"><codeph>tgargs</codeph></entry>
            <entry colname="col2">bytea</entry>
            <entry colname="col3"/>
            <entry colname="col4">Argument strings to pass to trigger, each NULL-terminated.</entry>
          </row>
          <row>
            <entry><codeph>tgqual</codeph></entry>
            <entry>pg_node_tree</entry>
            <entry/>
            <entry>Expression tree (in <codeph>nodeToString()</codeph> representation) for the
              trigger's <codeph>WHEN</codeph> condition, or null if none.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
